﻿<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="SliderControl.ascx.cs"
    Inherits="MpSoft.Web.Controls.Modules.SliderControl" %>
<script src="/Context/js/jquery.nivo.slider.pack.js"></script>



<div class="slider-wrapper theme-default">
    <div id="slider" class="nivoSlider">
        <asp:Repeater ID="rptSlider" runat="server" EnableViewState="false" OnItemDataBound="rptSlider_ItemDataBound">
            <ItemTemplate>
                <a href="<%# Eval("Link") %>" title="<%# Eval("Title") %>" target="<%# Eval("Target") %>">
                    <img src="<%# Eval("Image") %>" title="#htmlcaption-<%# Eval("AdvID") %>" alt="<%# Eval("Title") %>" height="<%# Eval("Height") %>" width="<%# Eval("Width") %>" />
                    <div id='htmlcaption-<%# Eval("AdvID") %>' class="nivo-html-caption">
                        <p><%# Eval("Title") %><%# string.IsNullOrEmpty(Eval("Description").ToString()) ? "" : " - " + Eval("Description").ToString() %></p>
                    </div>
                </a>

            </ItemTemplate>
        </asp:Repeater>
    </div>
</div>
<script type="text/javascript">
    $(window).load(function () {
        $('#slider').nivoSlider();
    });
</script>
